package com.beerandjesus.sportofkings.handicapper.model.brisnet.singlefile;

/**
 * Date: 6/7/13
 * Time: 6:32 PM
 */
public enum KeyTrainerStatisticsCategory {
    STAT_1ST_TIME_CLMG("1st Time Clmg"),
    STAT_1ST_AFTER_CLM("1st after clm"),
    STAT_1ST_AT_ROUTE("1st at route"),
    STAT_1ST_ON_GRASS("1st on grass"),
    STAT_1ST_START_W_TRN("1st start w/trn"),
    STAT_1ST_TIME_STR("1st time str"),
    STAT_1STTIMEBLINKERS("1stTimeBlinkers"),
    STAT_2ND_RTE_RACE("2nd Rte race"),
    STAT_2ND_AFTER_CLM("2nd after clm"),
    STAT_2ND_CAREER_RACE("2nd career race"),
    STAT_2ND_GRASS_RACE("2nd grass race"),
    STAT_2ND_OFF_LAYOFF("2nd off layoff"),
    STAT_2ND_STRT_W_TRN("2nd strt w/trn"),
    STAT_3RD_OFF_LAYOFF("3rd off layoff"),
    STAT_46_90DAYSAWAY("46-90daysAway"),
    STAT_90PLUS_DAYS_AWAY("90+ days away"),
    STAT_AW_TO_TURF("AW to Turf"),
    STAT_ALL_WEATHER("All Weather"),
    STAT_ALLOWANCE("Allowance"),
    STAT_BLINKERS_OFF("Blinkers off"),
    STAT_BLNKR_BACK_ON("Blnkr back on"),
    STAT_BTN_FAVORITE("Btn favorite"),
    STAT_CLAIMING("Claiming"),
    STAT_CLM_REPEATER("Clm repeater"),
    STAT_DEBUT_MDN_CLM("Debut Mdn Clm"),
    STAT_DIRT_TO_AW("Dirt to AW"),
    STAT_DIRT_TO_TURF("Dirt to Turf"),
    STAT_DIRT_STARTS("Dirt starts"),
    STAT_DOWN_2PLUS_CLASSES("Down 2+ classes"),
    STAT_DOWN_ONE_CLASS("Down one class"),
    STAT_GRADED_STAKES("Graded Stakes"),
    STAT_MAIDEN_CLMING("Maiden Clming"),
    STAT_MAIDEN_SP_WT("Maiden Sp Wt"),
    STAT_MDN_TO_MDNCLM("Mdn to MdnClm"),
    STAT_MDN_WIN_L_R("Mdn win L/R"),
    STAT_MDNCLM_TO_MDN("MdnClm to Mdn"),
    STAT_NO_CLASS_CHG("No Class Chg"),
    STAT_ROUTES("Routes"),
    STAT_RTE_TO_SPRINT("Rte to Sprint"),
    STAT_SHIPPER("Shipper"),
    STAT_SPRINT_TO_RTE("Sprint to Rte"),
    STAT_SPRINTS("Sprints"),
    STAT_SPRNT_RTE_SPRNT("Sprnt-Rte-Sprnt"),
    STAT_TURF_STARTS("Turf starts"),
    STAT_TURF_TO_AW("Turf to AW"),
    STAT_UP_ONE_CLASS("Up one class"),
    STAT_WNR_LAST_RACE("Wnr last race"),
    STAT_UNKNOWN("Unknown");

    private String code;

    private KeyTrainerStatisticsCategory(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public static KeyTrainerStatisticsCategory fromCode(String code) {
        for (KeyTrainerStatisticsCategory cat : values()) {
            if (cat.code.equals(code)) {
                return cat;
            }
        }
        return STAT_UNKNOWN;
    }

}
